<style>
    #qrcode img {
        max-width: 400px;
        max-height: 400px;
        margin: 0 auto
    }

    .content-box img:hover {
        opacity: 0.5
    }
</style>
<div class="crumbs">
    <h3>活动列表</h3>
    <p><a ui-sref="main.activity">活动管理</a> > 活动列表</p>
</div>

<div class="content-box">
    <div class="form-inline form-group ">
        <input type="text" class="form-control input-sm" placeholder="活动名称" maxlength="30" size="30" ng-model="list.searchKey">
        <select class="form-control input-sm " ng-options="v.code as v.desc for v in activityScene" ng-model="list.scene">
      <option value="">--活动场景不限--</option>
    </select>
        <select class="form-control input-sm " ng-options="v.code as v.desc for v in activityJustStatus" ng-model="list.justStatus">
      <option value="">--活动状态不限--</option>
    </select>
        <div class="inline-block f12 ">
            <button type="button" class="btn btn-primary btn-sm  input-sm " ng-click="submitSearch(list)">查询</button>
        </div>
        <div class="form-inline form-group float-right">
            <button type="button" class="btn btn-primary btn-sm" ui-sref="main.activity-add"> 新增活动</button>
        </div>
    </div>

    <table class=" table   table-hover table-condensed  table-striped text-center ">
        <thead style="background:#8A8BC4; color: #fff">
            <tr>
                <td>活动名称</td>
                <td>活动类型</td>
                <td>活动场景</td>
                <td>开始时间</td>
                <td>结束时间</td>
                <td>活动状态</td>
                <td>活动二维码</td>
                <td>操作</td>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="g in grid.result">
                <td ng-bind="g.name"></td>
                <td>{{g.typeDesc}}</td>
                <td ng-bind="g.sceneDesc"></td>
                <td>{{g.beginTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
                <td>{{g.endTime|date:'yyyy-MM-dd HH:mm:ss' }}</td>
                <td>{{g.justStatusDesc }}</td>

                <td><img class="cursor" title="点击放大查看" ng-click="showQrcode(getQrcode([g.id,g.sign]),g.name)" src="">
                    <i class="f12 c-blue cursor"></i>
                </td>
                <td>
                    <button class="btn btn-success btn-xs" ng-click="activityJoin(g.id,g.type)">报名信息</button>
                    <button ng-show="g.status===0" class="btn btn-warning btn-xs" ng-click="caseUp(g.id)">上架</button>
                    <button ng-show="g.status===1" class="btn btn-danger btn-xs" ng-click="caseDown(g.id)">下架</button>
                    <button class="btn btn-primary btn-xs" ng-click="edit(g.id,g.type)">修改</button>
                    <button class="btn btn-primary btn-xs" ng-click="lookActivity(g.id)" ng-show="g.type==1">查看</button><!--楼盘活动有查看 -->
                    <button ng-if="g.status!==1" class="btn btn-danger btn-xs" ng-click="del(g.id)">删除</button>
                </td>
            </tr>
        </tbody>
    </table>
    <div ng-include="'/templates/partial/page.html'" style="height: 50px;background-color: #f4f4f6"></div>
</div>


<!--dialog-->
<div class="modal fade myModalCode">
    <div class="modal-dialog " style="width: 460px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">{{qrcode.name}}</h4>
            </div>
            <div class="modal-body">
                <div class="dialog-content f12  text-center  lh200">
                    <div id="qrcode"></div>
                    <i class="f12 c-666 lh240">(下载请点击右键,另存为图片)</i>

                </div>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
